-
-
Notifications
You must be signed in to change notification settings - Fork 215
Add menu to split Portenta flash #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Memory usage change @ c348a49
Click for full report table
Click for full report CSV
|
Any instructions on how to test this out @facchinm ? I just want to run Blinky on the M4 and all the rest of the memory to the M7 to run an ML program and then run Blinky on the M7 and all the rest of the memory to the M4. |
I have very basic support for that in OpenMV firmware, it requires building the fw from source though, if you want to test it see: https://forums.openmv.io/t/portenta-micropython-on-m7-core-c-on-m4-core/6201/2?u=iabdalkader |
Thanks @iabdalkader , the instructions seem clear. I was however expecting C++ support for the old Arduino IDE, but from your post it looks like even when there is C++ support it will most likely involve building the C++ from source. Not against building from source, it just adds an extra level of complexity that I was hoping could be configured using an IDE. I think I will wait a bit and see what happens with this. Anyone from Arduino care to comment? |
* Relocate SDRAM at 0x60000000 to make it executable without touching the MPU * Patch mbed-os-to-arduino to automatically patch the linker scripts
de8bc0f
to
bcc4583
Compare
Hi Jeremy, |
Memory usage change @ bcc4583
Click for full report table
Click for full report CSV
|
@facchinm The install went fine, I see the extra RPC example Does this example just boot M4 to the SD Card or does it also re format the M7 memory to grab all the M4 memory? If it does reformat memory I don't see the relevant code. I just want to tweak the M7 and M4 memory not completely move the M4 to an SD card. P.S. Great work so far. Here is the example BootM4_from_SDRAM.ino
|
@hpssjellis the example shows how to perform the most "difficult" option, 100/0 split, that needs some extra steps to copy the M4 code into external SDRAM. |
I didnt understand until I saw the new menu item. That is super easy, and truly amazing, especially the 100/0, but I am looking for finer control, instead of just: 50/50 (M7/M4) Any chance you could add: Or can this be done from source with whatever settings are wanted. My use case is where one core just needs a bit more memory and the other core doesnt need as much. |
Just some feedback: In the regular Arduino IDE 1.8.15 when switching from M7 to M4 the "Flash Split" menu resets to What does seem to make sense is that I have been flashing my M7 program without bootM4(); activated, with whatever Flash Split I want, then flashing M4 with the same Flash Split, then flashing M7 with the bootM4(); function activated. So that M4 is never called before it is properly programmed. When testing 1:1 or 75/25 (so know added complexity with booting from an SD card) Is anyone else having similar issues? P.S. Possibly my installation is a bit messed up, it took a few trys to get it working. P.S.S I thought M7 had a smaller flash setting anyway, since I find I can load a much larger machine learning model onto the M4 core than the M7 core. I don't really understand the setting The folloswing image is some tests I did a while ago loading a much larger program onto the M4 |
Should I continue testing this Martino or wait for the next version? |
@facchinm, Any updates with the split Portenta Flash? I am having a lot of fun with Edge Impulse loading larger Machine Learning resolution models than the regular 96x96 (ignore the skew as the OLED is 128x64), seen here as the small rectangle showing only part of the 320x240 screen. .. These models identify if the Portenta is viewing a microcontroller. The LED turns blue when it "sees" a microcontroller, and green if not. .. When the split flash is fully working I should be able to get some much larger models loaded. Presently the split flash seems to load fine, I just can't load any larger models almost as if the larger memory is not being fully allocated. |
Manually merged |
This patchset allows splitting Portenta flash into different "partitions".
Unfortunately there's no method to keep M7 and M4 options synchronised, so it's up to the user not to flash binaries configured for different partitioning schemes.
The most interesting one is probably 100/0 , where the M4 firmware resides somewhere (not in internal flash) and must be copied to external RAM, address 0x60000000, before calling
bootM4()
@janjongboom @iabdalkader @pnndra